package com.chenyuxin.ilp.controller.user;

import com.chenyuxin.ilp.model.pojo.Result;
import com.chenyuxin.ilp.service.user.CaptchaService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user/captcha")
public class CaptchaController {
    @Autowired
    private  CaptchaService captchaService;


    @GetMapping("/generate")
    public Result generateCaptcha() {
        Result result = captchaService.generateCaptcha();
        return result;
    }

//    @PostMapping("/verify")
//    public Result verifyCaptcha(@RequestParam String key, @RequestParam String code) {
//        return captchaService.verifyCaptcha(key, code);
//    }
}
